<?php

namespace app\astroapp\controller\v1;

use app\astroapp\controller\AstroAppRemoteAuth;

class User extends AstroAppRemoteAuth
{
    public function getUidByUen()
    {
        $uen = trim(input('uen/s', ''));
        if (empty($uen))
        {
            return show(config('code.success'), '请求成功', ['uid' => 0]);
        }

        $uid = (new \app\common\cachemodel\User())->getUidByUen($uen);

        return show(config('code.success'), '请求成功', ['uid' => $uid]);
    }
}